import { Request, Response } from "express";
import classesService from "../../service/classesService";
import collegeService from '../../service/collegeService'
import majorService from "../../service/majorService";

class CollegeController {
  // 查找全部
  async findCollegeMjorClasses(req: Request, res: Response) {
    const collegeRes = await collegeService.findAll()
    const majorRes = await majorService.findAll()
    const classesgeRes = await classesService.findAll()
    res.gsmd({ collegeRes, majorRes, classesgeRes })
  }
  // 查找全部
  async findAll(req: Request, res: Response) {
    const result = await collegeService.findAll()
    res.gsmd(result)
  }
}

export default new CollegeController()
